<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no" />
		<link rel="stylesheet" type="text/css" href="../c/aui.css" />
		<style>
		html,
		body {
			height: 100%;
		}
			body {
				background: transparent !important;
			}
			.f{
				position: fixed;
				bottom: 0;
				left: 0;
				width: 100%;
				height: auto;
				overflow: hidden;
				background: #1D1F1F !important;
				z-index: 9;
			}
			.f .aui-card-list-footer{
				background: #1D1F1F !important;
			}
			.f{
				border-top-right-radius: 1rem;
				border-top-left-radius: 1rem;
			}
			.f p{
				color: #fff;
				font-size: 0.75rem;
				padding-top: 0.35rem;
				text-align: center;
			}
			.f .aui-card-list-footer div{
				width: 33.33333%;
				padding: 2rem 0;
			}
			.f img{
				width: 1.2rem;
				margin: 0 auto;
			}
			.t{
				z-index: 0;
				width: 100%;
				height: 100%;
			}
		</style>
	</head>
	<body>
		<div class="t" tapmode onclick="c()"></div>
		<div class="f">
			<div class="aui-card-list-footer">
				<div tapmode onclick="switchCamera()">
					<img src="../i/zhibo/sz-1.png" />
					<p>翻转</p>
				</div>
				<div tapmode onclick="setFilter()">
					<img src="../i/zhibo/sz-2.png" />
					<p>滤镜</p>
				</div>
				<!-- <div tapmode onclick="setScreen()">
					<img src="../i/zhibo/sz-4.png" />
					<p>横屏竖屏</p>
				</div> -->
				<!--<div tapmode onclick="setTorch()">
					<img src="../../image/zhibo/sz-5.png" />
					<p>闪光灯</p>
				</div>-->
				<div tapmode onclick="show()">
					<img src="../i/zhibo/sz-6.png" />
					<p>商品</p>
				</div>
				<div tapmode onclick="fx()">
					<img src="../i/zhibo/sz-3.png" />
					<p>分享</p>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../j/api.js"></script>
	<script type="text/javascript" src="../j/jquery-3.3.1.min.js"></script>
	<script type="text/javascript">
		apiready = function() {
			function urlsa() {
				var imglen = $("img").length;
				var picurlwa = picurl + "/zhibo";
				for (var i = 0; i < imglen; i++) {
					var tpl = $("img").eq(i).attr("src");
					tplaas = tpl.replace("../i/zhibo", picurlwa);
					$("img").eq(i).attr("src", tplaas);	
				
			}
			}
			_user = _getPrefs('_user');
			$api.fixTabBar($api.dom('.f'))
			api.parseTapmode();
		}
		function c(){
			api.closeFrame();
		}
		function switchCamera(){
			api.execScript({
			    frameName: 'zhibo_view_frm_1',
			    script: 'switchCamera()'
			});
			// c();
		}
		function setFilter(){
			api.execScript({
			    frameName: 'zhibo_view_frm_1',
			    script: 'setFilter()'
			});
			// c();
		}
		function setScreen(){
			api.execScript({
			    frameName: 'zhibo_view_frm_1',
			    script: 'setScreen()'
			});
			// c();
		}
		function setTorch(){
			api.execScript({
			    frameName: 'zhibo_view_frm_1',
			    script: 'setTorch()'
			});
			// c();
		}

		function fx(){
			var sharedModule = api.require('shareAction');
			sharedModule.share({
			    text: _getPrefs('_config').zhibo.fx_text,
			    type: 'url',
			    path: _sx_gurl,
			    images:_sx_gurl + '/public/style/image/logos.png',
			    thumbnail:_sx_gurl + '/public/style/image/logos.png',
			});
		}
		// 直播带货
		function show(){
			if(!_user.shiming){
				return _suxiangw_msg({content:'开通小店之前，请先实名认证',rightTitle:'我要实名',url:'_url({url:"member_shiming",title:"实名认证"})'})
			}
			if(_user.xiaodian){
				if(_user.xiaodian.hide == 1){
					return show_ajax();
				}else if(_user.xiaodian.hide == 2){
					return _suxiangw_msg2({content:'小店正在审核，请耐心等待',rightTitle:'知道了'},function(ret){dialogBox.close({dialogName: 'alert'})})
				}else if(_user.xiaodian.hide ==  0){
					return _suxiangw_msg2({content:'小店已封号，如有申诉请联系客服',rightTitle:'知道了'},function(ret){dialogBox.close({dialogName: 'alert'})})
				}
			}else{
				_url_shop({url:'shop_user_add',title:'开通小店'})
			}
		}
		function show_ajax(){
			_url({uid:_user.id,zhibo:true},'shop_shop_win')
		}
	</script>

</html>
